package exercises.Charpter7;

class Amphibian{
	private String name = null;
	
	Amphibian(){
		setName("");
	}
	
	Amphibian(String name){
		setName(name);
	}
	
	void move(){
		
	}
	void love(Amphibian other){
		System.out.println(getName() + " loves " + other.getName());
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}
}

class Frog extends Amphibian{
	Frog(String name){
		super(name);
	}
	
}

public class Sixteen {
	public static void main(String[] args){
		Frog a = new Frog("testa");
		Frog b = new Frog("testb");
		a.love(b);
	}
}
